<?php
$servername = "127.0.0.1";
$username = "root";
$pasword = "";
$dbname = "animal";
$conn = new mysqli($servername,$username,$pasword,$dbname);
@mysqli_set_charset($conn,utf8);
//检测链接
//获取链接错误信息
if($conn ->connect_error){
	die("连接失败:".$conn -> connect_error);
}
?>